package com.qhd.beo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qhd.beo.dao.order.IOrderDao;
import com.qhd.beo.entity.Order;
import com.qhd.beo.inter.IOrderService;


@Service
public class OrderServiceImpl implements IOrderService {
	
	private IOrderDao orderDao;
	
	@Autowired
	public void setOrderDao(IOrderDao orderDao) {
		this.orderDao = orderDao;
	}


	@Override
	public void addOrder(Order order) {
		// TODO Auto-generated method stub
		orderDao.insert(order);
	}


	@Override
	public void deleteOrder(Long id) {
		// TODO Auto-generated method stub
		orderDao.delete(id);
	}


	@Override
	public void modifyOrder(Order order) {
		// TODO Auto-generated method stub
		orderDao.update(order);
	}


	@Override
	public Order getOrderById(Long id) {
		// TODO Auto-generated method stub
		return orderDao.getById(id);
	}

}
